package poler.classes
{
	public class StringCutter
	{
		private static const maxLength:int = 32000;
		private static var Base64String:String;
		 
		public static function StringToArray(str:String):Array{
			var arr:Array = new Array();
			var strL:int = Math.ceil(str.length/maxLength);
			var sInt:int = 0;
			var eInt:int = maxLength;
			if(str.length > 0){
				for(var i:int = 0;i<strL;i++){
					if(sInt > eInt){
						break;
					}
					arr.push(str.substring(sInt,eInt));
					sInt += maxLength;
					eInt += maxLength;
				}
			}//
			return arr;
		}
		public static function ArraytoString(sArr:Array):String
		{
			Base64String = '';
			for each(var param:Object in sArr){
					Base64String += param;
			}
			return Base64String;
		}
		//
		public function StringCutter()
		{
			throw new Error("StringCutter is a Static Constructor.");
		}
	}
}